﻿Imports StructureMap
Imports StructureMap.Attributes
Imports StructureMap.Graph
Imports StructureMap.Configuration.StructureMapConfigurationSection
Imports StructureMap.Configuration.DSL
Imports myBookmarks.Data
Namespace myBookmarks.Web
    Public Class BookmarkRegistry
        Inherits Registry
        Public Sub New()
            Scan(AddressOf ScanAssemby)
            ForRequestedType(Of BookmarkContext)().CacheBy(InstanceScope.HttpContext).TheDefault.Is.ConstructedBy(Function() New BookmarkContext())
        End Sub

        Sub ScanAssemby(ByVal x As IAssemblyScanner)
            x.TheCallingAssembly()
            x.WithDefaultConventions()
        End Sub

    End Class
End Namespace